#define _CRT_SECURE_NO_WARNINGS
#include"SeqList.h"


void test1()
{
	SeqList s;
	SeqListInit(&s);


	SeqListPushBack(&s, 5);
	SeqListPrint(&s);
	SeqListPushBack(&s, 4);
	SeqListPrint(&s);
	SeqListPushBack(&s, 3);
	SeqListPrint(&s);
	SeqListPushBack(&s, 2);
	SeqListPrint(&s);
	SeqListPushBack(&s, 1);
	SeqListPrint(&s);


	 SeqListPopBack(&s);
	 SeqListPrint(&s);

	 SeqListPopBack(&s);
	 SeqListPrint(&s);

	 SeqListPopBack(&s);
	 SeqListPrint(&s);

	 SeqListPopBack(&s);
	 SeqListPrint(&s);

	 SeqListPushFront(&s, 4); 
	 SeqListPrint(&s);

	 SeqListPushFront(&s, 3);
	 SeqListPrint(&s);

	 SeqListPushFront(&s, 2);
	 SeqListPrint(&s);

	 SeqListPushFront(&s, 1);
	 SeqListPrint(&s);


	 SeqListPopFront(&s);
	 SeqListPrint(&s);

	 SeqListPopFront(&s);
	 SeqListPrint(&s);

	 SeqListInsert(&s, 2, 2);
	 SeqListPrint(&s);

	 SeqListInsert(&s, 2, 0);
	 SeqListPrint(&s);

	 SeqListInsert(&s, 2, -1);
	 SeqListPrint(&s);

	 SeqListErase(&s, 2);
	 SeqListPrint(&s);

	 SeqListErase(&s, 2);
	 SeqListPrint(&s);

	 SeqListErase(&s, 2);
	 SeqListPrint(&s);

	 int ret1=SeqListFind(&s, 3); 
	 int ret2=SeqListFind(&s, 4);
	 int ret3=SeqListFind(&s, 5);
	 int ret4=SeqListFind(&s, 1);

	 printf("%d %d %d %d\n", ret1, ret2, ret3, ret4);
	 SeqListDestroy(&s);

}
int main()
{
	test1();
	return 0;
}